{include file="common/head"}
<head>
<title>账单记录</title>

<style type="text/css">


</style>    
</head>
<body >
  <div class="container-fluid" >
    <form action="/index.php/customer/acc_log" method="post">
      <div id="query_bar"  style="line-height: 35px;margin:10px ;">
          <div class=" input-group" style="justify-content: flex-end;">
            <label for="cid">客户编号：</label>
            <input  type="text" class="form-control"  id="cid" name="cid" value="{$cid}"  style="max-width: 140px;" />
            <button type="button" class="btn btn-warning query" style="border-radius: 5px;" onclick="do_submit()" >
                <span class="bi-search" ></span>
            </button>
          </div>
      </div>
    </form>

    <table class="table table-sm table-hover table-striped">
        <thead>
          <th>Sn</th>
          <th>客户</th>
          <th>类型</th>
          <th>期初</th>
          <th>金额</th>
          <th>赠送</th>
          <th>期后</th>
          <th>日期</th>          
          <th>备注</th>
          <th>操作人</th>
          
        </thead>
        <tbody>
          {foreach $list['data'] as $k=>$log}
          <tr>
            <td>{$k+1}</td>
            <td>{$log['customer_id_name']}</td>
            <td>{$log['type_name']}</td>
            <td>{$log['money_before']}</td>
            <td style="color:{if $log['money']<0} red;{/if}">{$log['money']}</td>
            <td style="color:{if $log['money']<0} red;{/if}">{$log['money_gift']}</td>
            <td>{$log['money_after']}</td>
            <td>{$log['create_time']}</td>            
            <td>{$log['memo']}</td>
            <td>{$log['check_id_name']}</td>
            
          </tr>
          {/foreach}
        </tbody>
      </table>
    {include file="common/pagination"}      
    </div>

<script type="text/javascript">
    function do_submit(){
      if(!$("#cid").val()) {
        layer.msg("what?");return;
      }

    }
$(document).ready(function(){

    $(".btn-back").on('click',function(){
        window.history.back();
    })


  


})


</script>


</body>
</html>
